package start.spring.basic.job.entity;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import start.spring.basic.ry.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;


/**
 * JOB历史执行日志对象 gg_job_log
 * 
 * @author xyy
 * @date 2023-06-27
 */
@Data
@TableName("gg_job_log")
@ApiModel(value="gg_job_log表映射对象", description="")
public class GgJobLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableField("id")
    private Long id;

    @ApiModelProperty(value = "任务执行类名")
    @TableField("jobclass")
    private String jobclass;

    @ApiModelProperty(value = "任务名称")
    @TableField("jobname")
    private String jobname;

    @ApiModelProperty(value = "执行状态")
    @TableField("status")
    @Excel(name = "执行状态", readConverterExp = "0=等待执行,1=正在执行,2=执行完成,3=执行出错")
    private String status;

    @ApiModelProperty(value = "开始时间")
    @TableField("kssj")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date kssj;

    @ApiModelProperty(value = "开始时间起")
    @TableField(exist=false)
    private String beginKssj;
    
    @ApiModelProperty(value = "开始时间止")
    @TableField(exist=false)
    private String endKssj;

    @ApiModelProperty(value = "结束时间")
    @TableField("jssj")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date jssj;

    @ApiModelProperty(value = "错误信息")
    @TableField("cwxx")
    @Excel(name = "错误信息")
    private String cwxx;

    @ApiModelProperty(value = "批次号")
    @TableField("pch")
    @Excel(name = "批次号")
    private String pch;

    @ApiModelProperty(value = "TraceId")
    @TableField("traceid")
    @Excel(name = "TraceId")
    private String traceid;

	
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("jobclass", getJobclass())
            .append("jobname", getJobname())
            .append("status", getStatus())
            .append("kssj", getKssj())
            .append("jssj", getJssj())
            .append("cwxx", getCwxx())
            .append("pch", getPch())
            .append("traceid", getTraceid())
            .toString();
    }
}
